# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="3"

inherit eutils

DESCRIPTION="Ancilliary tools for the D programming language compiler."
# For now it' only rdmd

HOMEPAGE="http://www.digitalmars.com/d/"

LICENSE="DMD"
SLOT="2"
KEYWORDS="~x86 ~amd64"
IUSE=""
EAPI="2"

RESTRICT="mirror"

PDEPEND="dev-lang/dmd
	dev-libs/druntime
	dev-libs/phobos"

src_unpack() {
    # working copy from git repository for this version
    tar xjpf ${FILESDIR}/${P}.tar.bz2 -C ${WORKDIR}/ || die
    S="${WORKDIR}/${P}"
}

src_compile() {
	dmd rdmd.d || die "build failed"
}

src_install() {
	doman "${S}/rdmd.1" || die "man install failed"
	dobin "${S}/rdmd" || die "rdmd install failed"
}
